import api from './index'
import { axios } from '@/utils/request'

export function getBannerList (parameter) {
  return axios({
    url: api.BannerList,
    method: 'get',
    params: parameter
  })
}

export function deleteBanner (bannerId) {
  return axios({
    url: api.BannerDelete + bannerId,
    method: 'delete'
  })
}

export function updateBanner (parameter) {
  return axios({
    url: api.BannerUpdate,
    method: 'post',
    data: parameter
  })
}

export function addBanner (parameter) {
  return axios({
    url: api.BannerAdd,
    method: 'post',
    data: parameter
  })
}

export function getBannerInfo (bannerId) {
  return axios({
    url: api.BannerInfo + bannerId,
    method: 'get'
  })
}
